#FROM node:10.20.0
#RUN apt-get update \
#    && apt-get install -y nginx
#RUN mkdir /app
#WORKDIR /app
#COPY . /app/
#ENV PORT 80
#RUN mkdir /var/www/html/dist \
#    && npm install \
#    && npm run build \
#    && cp -r dist/* /var/www/html/dist \
#    && cp -r index.html /var/www/html \
#    && rm -rf /app
#RUN echo "Asia/shanghai" > /etc/timezone
#ENTRYPOINT ["nginx", "-g", "daemon off;"]
# 设置基础镜像
FROM nginx
# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面
COPY dist/  /usr/share/nginx/html/
#用本地的 default.conf 配置来替换nginx镜像里的默认配置
COPY default.conf /etc/nginx/conf.d/default.conf
